num-cmp
The NumCmp
trait for comparison between differently typed numbers.
use f32;
use Ordering;
use NumCmp;
assert!;
assert!;
assert!;
// 40_000_000 can be exactly represented in f32, 40_000_001 cannot
assert_eq!;
assert_ne!;
assert_eq!;
The i128
Cargo feature can be enabled in nightly
to get support for i128
and u128
types as well,
which is being implemented in Rust issue #35118.